<#macro umeditor id="" textbody="">
    <@lib_umeditor/>
<!-- 实例化编辑器代码 -->
<script type="text/javascript">
    $(function () {
        /*设置umeditor目录路径*/
        window.UMEDITOR_CONFIG.UMEDITOR_HOME_URL = "${CONTEXT_PATH}/plugin/umeditor/";
        /*设置图片上传路径*/
        window.UMEDITOR_CONFIG.imageUrl = "${CONTEXT_PATH}/umeup/";
        /*这个路径需要到umeditor.config.js中去修改*/
    <#--window.UMEDITOR_CONFIG.imagePath="${CONTEXT_PATH}/aa/";"-->
        window.um = UM.getEditor('${id}', {
            /* 传入配置参数,可配参数列表看umeditor.config.js */
            toolbar: ['source | undo redo | bold italic underline strikethrough | forecolor backcolor | removeformat |',
                'insertorderedlist insertunorderedlist | selectall cleardoc paragraph | fontfamily fontsize',
                '| justifyleft justifycenter justifyright justifyjustify |',
                'link unlink | emotion image video ',
                '| horizontal print preview fullscreen', 'drafts', 'formula']
        });
    });
</script>
    <#nested />
</#macro>

<#macro lib_umeditor>
<!-- 样式文件 -->
<link rel="stylesheet" href="${CONTEXT_PATH}/plugin/umeditor/themes/default/css/umeditor.css">
<!-- 引用jquery 会与其他页面jquery冲突导致各种问题-->
<#--<script src="${CONTEXT_PATH}/plugin/assets/plugins/jquery-1.10.2.min.js"></script>-->
<!-- 配置文件 -->
<script type="text/javascript" src="${CONTEXT_PATH}/plugin/umeditor/umeditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="${CONTEXT_PATH}/plugin/umeditor/umeditor.js"></script>
<!-- 语言包文件 -->
<script type="text/javascript" src="${CONTEXT_PATH}/plugin/umeditor/lang/zh-cn/zh-cn.js"></script>
</#macro>
